-- GENERATED SPELL FOR [Sandfury Acolyte] --


function spell0_8876(pUnit, Event) --@Curse of Weakness,n/a--
pUnit:FullCastSpellOnTarget(11980,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8876', 556, 1)
end

function spell1_8876(pUnit, Event) --@Mana Burn,n/a--
pUnit:FullCastSpellOnTarget(11981,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8876', 3000, 1)
end

function spell2_8876(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(9613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8876', 3000, 1)
end

function spell3_8876(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(11639,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8876', 18000, 1)
end

function Sorts_8876(pUnit, Event)
local choix_sorts_8876 = math.random(0, 3)
if choix_sorts_8876 == 0 then
pUnit:RegisterEvent('spell0_8876', 1, 1)
end
if choix_sorts_8876 == 1 then
pUnit:RegisterEvent('spell1_8876', 1, 1)
end
if choix_sorts_8876 == 2 then
pUnit:RegisterEvent('spell2_8876', 1, 1)
end
if choix_sorts_8876 == 3 then
pUnit:RegisterEvent('spell3_8876', 1, 1)
end
end

function mob8876_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8876', math.random(1500, 3000), 1)
end

function mob8876_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8876_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8876_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8876, 1, 'mob8876_Action')
RegisterUnitEvent(8876, 2, 'mob8876_Leave')
RegisterUnitEvent(8876, 3, 'mob8876_Kill')
RegisterUnitEvent(8876, 4, 'mob8876_Die')
